package com.custom.base.dialog

import android.widget.*
import com.custom.base.R
import com.custom.base.manager.SDActivityManager
import com.custom.base.util.SDViewUtil

/**
 * 作者：
 * 时间：2021/1/14
 * 描述：列表
 */
class SDDialogMenu(title:String = "标题",cancel:String = "取消",adapter: ListAdapter) :SDDialogBase(){
    init {
        val mView = SDActivityManager.instance.lastActivity?.let { SDViewUtil.getRId(it, R.layout.dialog_menu) }
        val mTvTitle = mView?.findViewById(R.id.dialog_menu_tv_title) as TextView
        val mTvCancel = mView.findViewById(R.id.dialog_menu_tv_cancel) as TextView
        val listView = mView.findViewById(R.id.dialog_menu_lv_listView) as ListView

        mTvTitle.text = title
        mTvCancel.text = cancel
        listView.adapter = adapter

        setDialogView(mView, false)
    }
}